import request from '@/utils/request'


//通过作业id获取题目
export function queryByTopic(title){
  return request({
    url: '/problem/queryByTitle/' + title,
    method: 'post'
  })
}
//添加题目
export function saveProblem(data){
  return request({
    url: '/problem/insert',
    method: 'post',
    data: data
  })
}
export function saveProblemid(data){
  return request({
    url: '/number/insert',
    method: 'post',
    data: data
  })
}
//查询题目
export function queryProblemByTopicId(topicId){
  return request({
    url: '/problem/queryByTopicId/'+topicId,
    method: 'post'
  })
}
//查询题目
export function queryProblemById(id){
  return request({
    url: '/problem/queryById/'+id,
    method: 'post'
  })
}
//修改题目
export function eidtProblem(data) {
  return request({
    url: '/problem/update',
    method: 'post',
    data: data
  })
}
//删除
export function DeleteProblem(id){
  return request({
    url: '/problem/delete/'+id,
    method: 'post'
  })
}
//通过作业id查询基本信息
export function queryByTopicId(id){
  return request({
    url: '/topic/queryById/'+id,
    method: 'post'
  })
}
